package com.gome.ss.webserver.servlet.view;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

import com.gome.ss.common.AppConfiguer;

public class IndexServlet extends HttpServlet {
	private static Logger logger = Logger.getLogger(IndexServlet.class);
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		req.setAttribute("ELKKibanaWebAddress", AppConfiguer.getStringByKey("ELKKibanaWebAddress"));
		req.setAttribute("ActiveMQWebAddress", AppConfiguer.getStringByKey("ActiveMQWebAddress"));
		req.setAttribute("ElasticsearchHeadWebAddress", AppConfiguer.getStringByKey("ElasticsearchHeadWebAddress"));
		req.setAttribute("ContentWebAddress", AppConfiguer.getStringByKey("ContentWebAddress"));
		
		req.getRequestDispatcher("index.jsp").forward(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(req, resp);
	}

}
